Tom,
Every once in a while, usually after I’m into a Gcode program 10 or 15 minutes my machine stops, the DRO’s turn yellow and my router stops. This is exactly the result I have programmed into my init file for when I hit the Estop button. I commented out the Estop code and the problem has gone away but I have no Estop. I’ve got my Estop wired normally closed so that if there is a broken wire on my Estop circuit the machine will not start. I’ve checked the wire and connections and cannot find any indication of a break. I think what might be happening is the Estop switch contacts may be a little oxidized and are causing a very brief lack of continuity because of vibration. I was thinking of adding a debounce line of code to my Estop code so that this “noise” could be filtered out but I can’t find anything on Debounce and how it should be formatted . Can you get me pointed in the right direction? Here is my Estop code:
//this is a continuous loop that checks the ESTOP bit and
//disables all Axis
while(ReadBit(ESTOP)!=1) // loop until Limit bit goes to specified polarity
WaitNextTimeSlice();
DisableAxis(0); //Stop X
DisableAxis(1); //Stop Y
SetBit(0); // set bit to a 1 (which turns router off)
Move (2,-3000); // raise bit to just under soft limit
DisableAxis(2); // Stop Z and survey the damage
return 0;
Also, my move command doesn’t work. Should I be using Moray’s ch0->Position = 5000 format instead?
Jack